<?php
class Doodle {

		var $doodle_id;
		var $author_name;
		var $author_school;
		var $author_year;
		var $author_state;
		var $doodle_abstract;
		var $doodle_thumb;
		var $doodle_full;
		
		
		function __construct($doodle_id,$author_name, $author_school, $author_year, $author_state, $doodle_abstract, $doodle_thumb, $doodle_full) {		
			$this->doodle_id = $doodle_id;
			$this->author_name = $author_name;
			$this->author_school = $author_school;
			$this->author_year = $author_year;
			$this->author_state = $author_state;
			$this->doodle_abstract = $doodle_abstract;
			$this->doodle_thumb = $doodle_thumb;
			$this->doodle_full = $doodle_full;
		}
		
		function toXMLString() {
			$str ='<?xml version="1.0" encoding="UTF-8" ?>';
			$str.="<doodle>";
			$str.="<doodle_id><![CDATA[$this->doodle_id]]></doodle_id>";
			$str.="<author_name><![CDATA[$this->author_name]]></author_name>";
			$str.="<author_school><![CDATA[$this->author_school]]></author_school>";
			$str.="<author_year><![CDATA[$this->author_year]]></author_year>";
			$str.="<author_state><![CDATA[$this->author_state]]></author_state>";
			$str.="<doodle_abstract><![CDATA[$this->doodle_abstract]]></doodle_abstract>";
			$str.="<doodle_thumb><![CDATA[$this->doodle_thumb]]></doodle_thumb>";
			$str.="<doodle_full><![CDATA[$this->doodle_full]]></doodle_full>";
			$str.='</doodle>';
			
			return $str;
		}
	}
?>